package com.hui10.mediaplayer.ui.activity

import android.support.v4.view.ViewCompat
import android.support.v4.view.ViewPropertyAnimatorListener
import android.view.View
import com.hui10.mediaplayer.R
import com.hui10.mediaplayer.base.BaseActivity
import kotlinx.android.synthetic.main.activity_splash.*

/**
 * Author: Created by lucus on 2019/5/23.
 * E-mail: mcphilex1989@gmail.com
 * Tel: 15652608401
 */
class SplashActivity : BaseActivity(), ViewPropertyAnimatorListener {

    override fun onAnimationEnd(p0: View?) = startActivityAndFinish<MainActivity>()

    override fun onAnimationCancel(p0: View?) {

    }

    override fun onAnimationStart(p0: View?) {

    }

    override fun getLayoutId(): Int {
        return R.layout.activity_splash
    }

    override fun initData() {
        ViewCompat.animate(imageView).scaleX(1.0f).scaleY(1.0f).setListener(this).duration = 2000
    }

}